package com.sgl.myview.business;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.sgl.myview.R;
import com.sgl.myview.business.qqcehua.QQNewCeHuaActivity;
import com.sgl.myview.business.qqcehua.VDHLayoutActivity;
import com.sgl.myview.business.welcome.HorizontalWelcomeActivity;
import com.sgl.myview.business.welcome.WelComePageActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.text1).setOnClickListener(this);
        findViewById(R.id.text2).setOnClickListener(this);
        findViewById(R.id.text3).setOnClickListener(this);
        findViewById(R.id.text4).setOnClickListener(this);
        findViewById(R.id.text5).setOnClickListener(this);
        findViewById(R.id.text6).setOnClickListener(this);
        findViewById(R.id.text7).setOnClickListener(this);
        findViewById(R.id.text8).setOnClickListener(this);
        findViewById(R.id.text9).setOnClickListener(this);
        findViewById(R.id.text10).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.text1:
                startActivity(CustomTextActivity.getInstance(this));
                break;
            case R.id.text2:
                startActivity(CustomImageActivity.getInstance(this));
                break;
            case R.id.text3:
                startActivity(CustomProgressBarActivity.getInstance(this));
                break;
            case R.id.text4:
                startActivity(CustomVolumControlBarActivity.getInstance(this));
                break;
            case R.id.text5:
                startActivity(CustomImgContainerActivity.getInstance(this));
                break;
            case R.id.text6:
                startActivity(VDHLayoutActivity.getInstance(this));
                break;
            case R.id.text7:
                startActivity(MyGridViewActivity.getInstance(this));
                break;
            case R.id.text8:
                startActivity(WelComePageActivity.getInstance(this));
                break;
            case R.id.text9:
                startActivity(HorizontalWelcomeActivity.getInstance(this));
                break;
            case R.id.text10:
                startActivity(QQNewCeHuaActivity.getInstance(this));
                break;

        }
    }
}
